/*
 * Copyright (c) 2006-2021, Ulandlink Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2022-11-15      wxl    first version
 */
 
#ifndef __AT_DEVICE_R6_H__
#define __AT_DEVICE_R6_H__
 
#ifdef __cplusplus
extern "C" {
#endif
 
#include <stdlib.h>
#include <at_device.h>


/* The maximum number of sockets supported by the R6 device */
#define AT_DEVICE_R6_SOCKETS_NUM      7
#define R6_DEIVCE_NAME       		  "lara_r6"

struct at_device_r6
{
	char *device_name;
	char *client_name;
	int main_power_pin;
	int power_pin;
	int reset_pin;
	int power_status_pin;
	size_t recv_line_num;
	struct at_device device;
	
	void *socket_data;
	void *user_data;
	
	rt_bool_t power_status;
};

#ifdef AT_USING_SOCKET

/* R6 device socket initialize */
int r6_socket_init(struct at_device *device);

/* R6 device class socket register */
int r6_socket_class_register(struct at_device_class *class);

int r6_device_class_register(void);

int r6_device_register(void);
	
r6_device_info r6_device_get_info(void);

#endif /* AT_USING_SOCKET */
 
 #ifdef __cplusplus
 }
 #endif
 
 #endif /* __AT_DEVICE_R6_H__*/
 
 